3.22.8 \(\int (\frac {1}{x}-\frac {1}{x \sqrt {1+b x+c x^2}}) \, dx\)

Optimal. Leaf size=23 \[ \log \left (-2 \sqrt {b x+c x^2+1}-b x-2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.17, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {724, 206} \begin {gather*} \tanh ^{-1}\left (\frac {b x+2}{2 \sqrt {b x+c x^2+1}}\right )+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1) - 1/(x*Sqrt[1 + b*x + c*x^2]),x]

[Out]

ArcTanh[(2 + b*x)/(2*Sqrt[1 + b*x + c*x^2])] + Log[x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rubi steps

\begin {align*} \int \left (\frac {1}{x}-\frac {1}{x \sqrt {1+b x+c x^2}}\right ) \, dx &=\log (x)-\int \frac {1}{x \sqrt {1+b x+c x^2}} \, dx\\ &=\log (x)+2 \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {2+b x}{\sqrt {1+b x+c x^2}}\right )\\ &=\tanh ^{-1}\left (\frac {2+b x}{2 \sqrt {1+b x+c x^2}}\right )+\log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 27, normalized size = 1.17 \begin {gather*} \tanh ^{-1}\left (\frac {b x+2}{2 \sqrt {b x+c x^2+1}}\right )+\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1) - 1/(x*Sqrt[1 + b*x + c*x^2]),x]

[Out]

ArcTanh[(2 + b*x)/(2*Sqrt[1 + b*x + c*x^2])] + Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [B]  time = 0.17, size = 58, normalized size = 2.52 \begin {gather*} 2 \log \left (\sqrt {b x+c x^2+1}-\sqrt {c} x+1\right )-\log \left (-2 \sqrt {c} \sqrt {b x+c x^2+1}+b+2 c x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[x^(-1) - 1/(x*Sqrt[1 + b*x + c*x^2]),x]

[Out]

2*Log[1 - Sqrt[c]*x + Sqrt[1 + b*x + c*x^2]] - Log[b + 2*c*x - 2*Sqrt[c]*Sqrt[1 + b*x + c*x^2]]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 30, normalized size = 1.30 \begin {gather*} \log \relax (x) - \log \left (-\frac {b x - 2 \, \sqrt {c x^{2} + b x + 1} + 2}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="fricas")

[Out]

log(x) - log(-(b*x - 2*sqrt(c*x^2 + b*x + 1) + 2)/x)

________________________________________________________________________________________

giac [B]  time = 0.26, size = 50, normalized size = 2.17 \begin {gather*} \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + b x + 1} + 1 \right |}\right ) - \log \left ({\left | -\sqrt {c} x + \sqrt {c x^{2} + b x + 1} - 1 \right |}\right ) + \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="giac")

[Out]

log(abs(-sqrt(c)*x + sqrt(c*x^2 + b*x + 1) + 1)) - log(abs(-sqrt(c)*x + sqrt(c*x^2 + b*x + 1) - 1)) + log(abs(
x))

________________________________________________________________________________________

maple [A]  time = 0.04, size = 24, normalized size = 1.04 \begin {gather*} \arctanh \left (\frac {b x +2}{2 \sqrt {c \,x^{2}+b x +1}}\right )+\ln \relax (x ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x-1/x/(c*x^2+b*x+1)^(1/2),x)

[Out]

arctanh(1/2*(b*x+2)/(c*x^2+b*x+1)^(1/2))+ln(x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x^2+b*x+1)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c-b^2>0)', see `assume?` for
 more details)Is 4*c-b^2 positive, negative or zero?

________________________________________________________________________________________

mupad [B]  time = 1.09, size = 27, normalized size = 1.17 \begin {gather*} \ln \left (\frac {b}{2}+\frac {\sqrt {c\,x^2+b\,x+1}}{x}+\frac {1}{x}\right )+\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/x - 1/(x*(b*x + c*x^2 + 1)^(1/2)),x)

[Out]

log(b/2 + (b*x + c*x^2 + 1)^(1/2)/x + 1/x) + log(x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {b x + c x^{2} + 1} - 1}{x \sqrt {b x + c x^{2} + 1}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/x-1/x/(c*x**2+b*x+1)**(1/2),x)

[Out]

Integral((sqrt(b*x + c*x**2 + 1) - 1)/(x*sqrt(b*x + c*x**2 + 1)), x)

________________________________________________________________________________________